timorgano
timorgano

Reputation: 73

Presto - Return 1 element of a row of an array

I have a table with a nested json array in (columnname), made up of 5 parts (col1,col2,col3,col4,col5), with a number of "rows". col5 is the row number. I am trying to extract col3 for row 1.

A colleague of mine suggested I use element_at(columnname, 1), which returns the whole json string for that row of data, but I want to extract one part of that data. I cannot find how to extract one part of that json string from what I have.

Is there a way to extract col3?

Upvotes: 1

Views: 5142

Answers (1)

timorgano
timorgano

Reputation: 73

Found it. element_at(columnname,1).col1

Upvotes: 2

Related Questions