Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Parse string into object

Topic Labels: Scripting extentions
256 3
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi there - How is it possible to parse (convert string into object with keys) in airtable scripting?

Here is some sample string text:

{
  a: 'somestring',
  b: 42,
  c: false
},{
	a: 'somethine else',
    b: 10,
    c: true}

The output should be two objects with three keys

3 Replies 3

If your string were JSON, you could use JSON.parse(), but your string is not quite JSON. Can you get the string sent to you as JSON?

Thanks. I am creating the string via Airtable scripting and reading it there as well.

Instead of (or in addition to) making the string in scripting, why not just make the object directly?