# Connection(many to many) record not being updated for multiple connections using API

**URL:** <https://forums.knack.com/t/connection-many-to-many-record-not-being-updated-for-multiple-connections-using-api/15298>\
**Category:** Get Answers\
**Created:** [December 6, 2023, 6:36am UTC](https://forums.knack.com/t/connection-many-to-many-record-not-being-updated-for-multiple-connections-using-api/15298 "2023-12-06T06:36:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeBeatti08620](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@MikeBeatti08620](https://forums.knack.com/u/MikeBeatti08620)\
**Post date:** [December 6, 2023, 6:36am UTC](https://forums.knack.com/t/connection-many-to-many-record-not-being-updated-for-multiple-connections-using-api/15298/1 "2023-12-06T06:36:01Z")

</div>

Hi,

I am trying to update a connected record which has many to many relation with another object but it fails to update for multiple using API

there is a similar question but that solution doesn’t work for me either

> [@Add ANOTHER connection using the API and jQuery](https://forums.knack.com/t/add-another-connection-using-the-api-and-jquery/13422/2):
>
> I finally figured it out so am posting for anyone else who needs to ADD CONNECTIONS to a field that already has some connections in it: It was very confusing because what would come OUT OF the existing array was not the same way that I needed to put it back in! I had to Read the existing connections from the raw connection field Extract ONLY the id from each record Put each existing ID into a temporary array Add the new ID to the temporary array Send the temporary array in my JSON object and…

so the scenario is

object\_1 and object\_2 has many to to many relation, I am maintaining the relation in object\_1, so when I try to update object\_1 through API, it works for a single record but for multiple it doesn’t.

to explain through code

object\_1[field\_2]=[id1] works  
but  
object\_1[field\_2]=[id1,id2] doesn’t work

it saves field\_2 as blank.
