This question is locked. New answers and comments are not allowed.
Hi,
I have a Backend Services Data object that keep others objects. It's a array of objects. How can I append a object to this "array" using the Backend Services Javascript SDK?
For example:
The original object in the BS Data is...
contacts: [
{ 'firstname' : 'John', 'lastname' : 'Doe', 'age': 32 },
{ 'fisrtname' : 'Foo', 'lastname' : 'Bar', 'age': 48 }
]
So, I append the object { 'fisrtname' : 'Mary', 'lastname' : 'Ann', 'age': 27 }, and the result is:
contacts: [
{ 'firstname' : 'John', 'lastname' : 'Doe', 'age': 32 },
{ 'fisrtname' : 'Foo', 'lastname' : 'Bar', 'age': 48 },
{ 'fisrtname' : 'Mary', 'lastname' : 'Ann', 'age': 27 }
]
Thanks in advance!
I have a Backend Services Data object that keep others objects. It's a array of objects. How can I append a object to this "array" using the Backend Services Javascript SDK?
For example:
The original object in the BS Data is...
contacts: [
{ 'firstname' : 'John', 'lastname' : 'Doe', 'age': 32 },
{ 'fisrtname' : 'Foo', 'lastname' : 'Bar', 'age': 48 }
]
So, I append the object { 'fisrtname' : 'Mary', 'lastname' : 'Ann', 'age': 27 }, and the result is:
contacts: [
{ 'firstname' : 'John', 'lastname' : 'Doe', 'age': 32 },
{ 'fisrtname' : 'Foo', 'lastname' : 'Bar', 'age': 48 },
{ 'fisrtname' : 'Mary', 'lastname' : 'Ann', 'age': 27 }
]
Thanks in advance!