I've been having a heck of a time trying to figure this out. Still relatively new to _Underscore JS and I'm attempting to create an array of unique values from an array of nested objects. Example data below:
[
{
"property":"prop1",
"list":[
{
"description":"description blah",
"type":"F",
"values":{
"value1":30.0,
"value2":0.0
}
},
{
"description":"description blah",
"type":"F",
"values":{
"value1":30.0,
"value2":0.0
}
}
]
},
{
"property":"prop2",
"list":[
{
"description":"description blah",
"type":"Q",
"values":{
"value1":30.0,
"value2":0.0
}
}
]
}
]
What I'm attempting to get back is an array of ALL the UNIQUE nested "type" values. Example of data back below:
["F","Q"]
I've attempted _.pluck and _.map with little success. Would I need to utilize something different, such as chaining them? Appreciate any help I could get on this.