BorisJe,
<pre id="out"></pre>
<script>
let obj =
{
"$id": "1", "id": 34, "dateTimeAdd": "2021-12-11T16:45:12.0015098", "cash": 70, "listCoinsChanges":
{
"$id": "2", "$values":[
{
"$id": "3", "id": 52, "cost": 10.00, "quantity": 2, "order":
{
"$ref": "1"
}
}
]
}
, "productId": 9, "product": null
} ;
let arr = obj.listCoinsChanges.$values;
out.append(JSON.stringify(arr, "", 1));
out.append(`\n cost : ${arr[0].cost}`);
out.append(`\n quantity : ${arr[0].quantity}`);
</script>
|