Ask Your Question

How to rename columns after converting to list from JSON?

asked 2020-04-21 00:12:38 -0500

Maria gravatar image

updated 2020-04-21 09:28:00 -0500

metadaddy gravatar image

Hi all, I am streaming a JSON file, then using Field Order, I convert it to a list. It doesn't take the name of fields and the output filed names are numbers: [0], [1], .... I am using Field Rename to change them to original name manually. But it gives error that these filed names do not exist. e.g. Source Field Expression /'[0]' Target Field Expression: /'MyName' Any suggestion? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-21 09:30:05 -0500

metadaddy gravatar image

List contents don't have field names, they are just an ordered list of anonymous fields, like an array in many programming languages. You should convert the JSON map to a list-map. This is an ordered map - the fields retain their names and their order.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-04-21 00:12:38 -0500

Seen: 33 times

Last updated: Apr 21