0

Отфильтровать JSON

funcion sortAttribute(JSON, attr) { } Нужно используя ключ узнать является ли данный объект object или array

16th Jan 2024, 10:18 AM
Yuliia Movchan
Yuliia Movchan - avatar
4 Antworten
+ 2
Check this one: function checkArray(e) { if(Array.isArray(e)) { return "Array"; } else { return "Object"; } }
16th Jan 2024, 10:46 AM
🇮🇱 Radin Masiha 🇮🇱
🇮🇱 Radin Masiha 🇮🇱 - avatar
+ 2
Yuliia Movchan, is your problem solved? Any other questions?
16th Jan 2024, 10:40 PM
🇮🇱 Radin Masiha 🇮🇱
🇮🇱 Radin Masiha 🇮🇱 - avatar
+ 1
I can't understand your question, could you please give me more detalis?
16th Jan 2024, 10:33 AM
🇮🇱 Radin Masiha 🇮🇱
🇮🇱 Radin Masiha 🇮🇱 - avatar
+ 1
I need to write code wich will help me to understand type of received attribute is it object or array
16th Jan 2024, 10:37 AM
Yuliia Movchan
Yuliia Movchan - avatar