Given the following array, which contains arrays of objects:
[
[
{color: blue, size: 3},
{color: red, size: 1},
{color: blue, size: 4}
],
[
{color: blue, size: 4},
{color: green, size: 9},
{color: gren, size: 3}
]
]
How could I filter the data so that I am only left with objects which have a proprty of blue, like this:
[
[
{color: blue, size: 3},
{color: blue, size: 4}
],
[
{color: blue, size: 4}
]
]
It is in the context of D3js, but this maybe just a plain JavaScript question.