Skip to content

Instantly share code, notes, and snippets.

@lode
Created December 1, 2012 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lode/4185261 to your computer and use it in GitHub Desktop.
Save lode/4185261 to your computer and use it in GitHub Desktop.
Saving an object in Apigee
animals.get(function(){
console.log(animals);
console.log(animals._list[0]['_uuid']);
while(animals.hasNextEntity()) {
var animal = animals.getNextEntity();
$('#animalList').append('<li>we have a ' + animal.get('kind') + ' called ' + animal.get('name') + '</li>');
console.log(animal);
console.log(animal._uuid);
if (animal.get('name') == 'lode') {
console.log('dit is lode');
animal.set('name', 'lode claassen');
animal.save();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment