Skip to content

Instantly share code, notes, and snippets.

@nivv
Created October 12, 2015 06:19
Show Gist options
  • Save nivv/b3dd29bd3932523a53fd to your computer and use it in GitHub Desktop.
Save nivv/b3dd29bd3932523a53fd to your computer and use it in GitHub Desktop.
// I have two objects that contains the same type of objects. But how can I sync them?
// For instance, if the name changes in any of the objects I want the other array
// to be udpdated with the new value. Is this possible?
"images": [
{
"id": 38,
"name": "IFK 2015.png",
"path": "uploads/images/IFK 2015.png",
},
{
"id": 36,
"name": "Upp och ner.jpeg",
"path": "uploads/images/Upp och ner.jpeg",
}
];
"images2": [
{
"id": 38,
"name": "IFK 2015.png",
"path": "uploads/images/IFK 2015.png",
},
{
"id": 36,
"name": "Upp och ner.jpeg",
"path": "uploads/images/Upp och ner.jpeg",
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment