Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Need Help JSON Formating?

$
0
0
Hi IRF users, i am asking a little bit help how i can format my JSON data readable by human?
something like this:

Click image for larger version

Name:	Screenshot_13.png
Views:	7
Size:	5.7 KB
ID:	305773

link of the above ss is here: http://regex.info/code/JSON.lua


for now what i do is i create a loop to remove and replace:
filter = {"{", "}", ",", "},"}

for k,v in pairs (filter) do
tFilter = String.Find(x, v, 1, false)
if v == "{" then
x = String.Replace(x, v, "{\r\n ", false);
end
if v == "}" then
x = String.Replace(x, v, "\r\n }", false);
end
if v == "," then
x = String.Replace(x, v, ",\r\n ", false);
end
if v == "}," then
x = String.Replace(x, v, "},\r\n ", false);
end
end

i know there is another way like in my screenshot, anyone can help? Thank you so much...


telco


Viewing all articles
Browse latest Browse all 2105

Trending Articles