Here is the structure of my tickerTagObject array:
It consists of objects
, with each containing another object
along with an additional array
I have successfully extracted tickers using the following code snippet:
var tickerObjs = _(tickerTagObjs)
.filter(function(tiks) { return tiks; })
.pluck('ticker')
.value();
console.log(tickerObjs);
^ This gives me an array of ticker objects
However, applying the same method to extract tags does not produce the desired result, possibly because tags are in an Array
format rather than an Object
?
var tagObjs = _(tickerTagObjs.tags)
.filter(function(tags) { return tags; })
.pluck('tags')
.value();
console.log(tagObjs);
How can lodash be used to "pluck" the tag objects
within the array
of tags found inside each TagsObject
?