I have a list of fields with me obtained from parsing nested JSON data. Following is an example schema. The no of fields is dynamic in nature
| yrseq | tax_lots_0_lot_price | tax_lots_0_lot_seq_no | tax_lots_1_lot_price | tax_lots_0_lot_seq_no |
| 20190 | 210 | 12 | 446 | 45 |
I need to convert all the fields of type tax_lots_0_lot_price to tax_lots.0.lot_price. Basically replace the "_0_" to something like ".0.". I have transposed the table to make the columns as field value. Tried applying a REGEX_REPLACE method with a regex string of "_\d+_" The issue is when I want to replace the string I want it to retain the numeric value too.
Your suggestions are most welcome. Thank you for your time