If you want to update session when user does something on your page, you should create a ajax request to the server. Referring one of my similar answer here... You didn't inject module of 'Restangular' service. Where you put the object and key name to get value if exist. Nothing wrong with it. In addition to Lo-Dash methods, wrappers also have the following Array … I would say Clojure's syntax is light enough that it feels sufficient to use a combination of map and an accessor utility like get-in. An extended custom build of lodash, generated with: # lodash exports=commonjs include=assign,clone,filter,each,map,random,reduce,some - lodash.custom.js This means it will not work in IE8 or older. This would work even if one of the items in the provided list is not an object or does not contain the field. (adsbygoogle = window.adsbygoogle || []).push({}); javascript – From an array of objects, extract value of a property as array, The Prototype library added a “pluck” function to the Array prototype (I think), so you could write, @N20084753 for a fair test you should also compare the native. you need to refer to property "name" in the object obj.roles[0].name Another problem is that var finalXML get a new value every line. I don't understand why it would give me two hellos back? setIntervsal() does not fit. Additionally, _.map() now allows a string to be passed in as the second parameter, which is passed into _.property(). pluck() method is used for get the values of keys from a collection/array. The other answers point out the use of map, which is natural (especially for guys used to functional style) and concise. Update 2: As Mark points out in the comments, somewhere between Lodash v4 and 4.3, a new function has been added that provides this functionality again. The Catalog of Events has this to say about a "change" event: "change" (model, options) — when a model's attributes have changed. You can refer to clojure.core API reference and the cheatsheet to look up what's available. on lodash (similar to underscore) , you can use _.mapValues(elements,'temperature'). Fiddle... Let suppose on button click you are calling ajax method