Editing an entity reference field using Drupal services

87 Views Asked by At

Following the example for node references using the auto complete widget, I could finally save reference to other nodes. Now, imagine the opposite, I want to remove a reference, what should the format for that be? I tried just remove sections from the fields JSON object but actually it doesn't change anything.

For example, this is the current data:

{"und":[{"nid":"[nid:431]"},{"nid":"[nid:561]"},{"nid":"[nid:563]"}]}

An this is a simple change

{"und":[{"nid":"[nid:431]"},{"nid":"[nid:561]"}]}

But if I execute the PUT with this data, I keep the same old value. Any one know how to fix that?

0

There are 0 best solutions below