Код: Выделить всё
{
"data": [
{
"id": 3210,
"status": "2",
"date": "2023-11-01 00:00:00.000",
"value": "123.45",
"financial_planning": {
"id": 1234,
"created_at": "2023-10-20 00:00:00.000",
"contract": {
"id": 12211,
"date": "2023-10-20 00:00:00.000",
"total_contract_value": "123.45",
Код: Выделить всё
const map = new Map(Object.entries(data));
Array.from(map.entries()).forEach(([key, value]) => {
console.log(key + " is " + Object.entries(value));
for (let [key2, value2] of Object.entries(value)) {
console.log("--> "+key2+" will be"+ value2);
}
});
Подробнее здесь: https://stackoverflow.com/questions/793 ... json-value
Мобильная версия