From json to array to datagrid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: From json to array to datagrid

Post by teacherguy » Thu Dec 29, 2011 5:20 am

Mark, thank you so much for your time, I really appreciate it. :)

Brian

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: From json to array to datagrid

Post by marksmithhfx » Sat Jan 07, 2012 10:33 pm

BTW, here is an easier way to do the parsing in the parse button:

Code: Select all

on mouseUp
   set the dgText of group "plan from google" to empty -- initialize
   put empty into fld output -- initialize
   put fld"input" into tinput -- initialize
   put quote & "c" & quote & ":" into delimiter  -- i.e. "c":
   replace delimiter with return in tinput -- seperate input into records
   put quote & "v" & quote & ":" into delimiter -- i.e. "v":
   replace delimiter with tab in tinput -- seperate records into fields
   put tinput into fld"output" -- lets have a look at it
end mouseUp
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: From json to array to datagrid

Post by teacherguy » Sun Jan 08, 2012 6:42 pm

Clean and elegant, thanks much

Post Reply