Ignore the last element of a json
问题 My Json result from the API is as below Json result: "Issues": [{ "Id": null, "Key": null, "Values": [{ "Key": "Display Name", "Value": "Rya" }, { "Key": "UserName", "Value": "RH" }, { "Key": "Count", "Value": "350" } ] }, { "Id": null, "Key": null, "Values": [{ "Key": "Display Name", "Value": "Mike" }, { "Key": "UserName", "Value": "ML" }, { "Key": "Count", "Value": "90" } ] } ] I did a mapping by doing as below- .Issues.map(o => o.Values.reduce((acc, { Key, Value }) => (acc[Key] = Value,