Help

Parse string into object

Topic Labels: Scripting extentions
1094 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Rose_Haft1
8 - Airtable Astronomer
8 - Airtable Astronomer

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?