Created
December 1, 2012 21:40
-
-
Save lode/4185261 to your computer and use it in GitHub Desktop.
Saving an object in Apigee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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