linq.js - get all values from dictionary -


i'm using linqjs in website , i'm trying values of dictionary populated todictionary() library extension.

here code:

var imagesdictionary = enumerable.from(data)     .select(function (x) {         var images = enumerable.from(x.imagessections)             .selectmany(function (y) {                 return enumerable.from(y.images)                     .select(function (z) {                         return z.thumb;                     });             })             .toarray();          return { title: x.title, images: images };     })     .todictionary("$.title", "$.images");  var imagestopreload = imagesdictionary.toenumerable()     .selectmany("$.value"); 

i imagestopreload become array of images contained in dictionary can't understand how , this:

var imagestopreload = imagesdictionary.toenumerable()                 .selectmany("$.value"); 

seems way used obtain that.

could me?

since appears you're using linqjs 3 beta version, format of entries have changed. properties in lowercase now.

var imagesdictionary = enumerable.from(data)     .todictionary("$.title",         "enumerable.from($.imagessections).selectmany('$.images', '$$.thumb').toarray()"     );  var imagestopreload = imagesdictionary.toenumerable()     .selectmany("$.value") // lowercase 'value'     .toarray(); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -