I have JSON with dynamic data.
How I can create array address from data returned by JSON?
var json= JSON.parse(result);
var address = json.address;
console.log(address) :
2.26095199584961,2.2635269165039067,2.2908210754394536,2.2951126098632817
-
String.prototype.split()Yevhen Horbunkov– Yevhen Horbunkov2022年04月13日 14:35:50 +00:00Commented Apr 13, 2022 at 14:35
2 Answers 2
Assuming this is some JavaScript you're talking about, you might consider using:
var yourVar = yourString.split(separator, limit)
Sign up to request clarification or add additional context in comments.
Comments
Based on your input, use split function to do the same
let addressArra = address.split(',');
answered Sep 23, 2022 at 12:48
Umar Farooque Khan
5081 gold badge6 silver badges17 bronze badges
Comments
default