0
内のデータをフィルタリングするためにどのように私はJSでオブジェクトを次ていますJavaScriptは:辞書
[
{
"financial_year":1,
"mainline_revenue":18743.0,
"regional_revenue":2914.0,
"other_revenue":3198.0,
"non_operating_items":-1983.0
},
{
"financial_year":2,
"mainline_revenue":20218.0,
"regional_revenue":3131.0,
"other_revenue":3394.0,
"non_operating_items":-3233.0
},
{
"financial_year":3,
"mainline_revenue":30802.0,
"regional_revenue":6322.0,
"other_revenue":5526.0,
"non_operating_items":-1367.0
}
]
financial_yearは、私は、データをフィルタリングするために使用する一意の識別子です。例えばfinancial_yearが2のデータをフィルタリングし、他の値を配列に入れるにはどうすればよいですか?
グーグル:MDNアレイ方法。フィルターが必要です。 – dfsq
[ES6でオブジェクトの値をフィルタする方法](https://stackoverflow.com/questions/44025984/how-to-filter-an-object-with-its-values-in-es6) – Atty
何か試しましたか? – andrewgi