Hi all. I need to round certain variables in a data feed that's coming in the following format:
For instance the "gap" variable to 2 decimal places. It seems this can be done simply using jsonata's $round function through the change node. I can't figure out how to address individual variables to process the entire array and get it out in the same format. Thanks so much!
[{"ticker":"NASDAQ:LASE","name":"LASE","close":7.93,"gap":-3.7037037037,"relative_volume_10d_calc":20.8748866128,"change":83.5648148148,"premarket_change":-1.8518518519,"float_shares_outstanding":3858570.0383889996,"change_from_open":90.625},{"ticker":"NASDAQ:OTRK","name":"OTRK","close":2.76,"gap":64.8351648352,"relative_volume_10d_calc":461.2613085129,"change":51.6483516484,"premarket_change":65.3846153846,"float_shares_outstanding":1248683.6766000001,"change_from_open":-8},{"ticker":"AMEX:BURU","name":"BURU","close":1.01,"gap":33.4824424066,"relative_volume_10d_calc":58.3945386478,"change":125.90024603,"premarket_change":29.9485573697,"float_shares_outstanding":3556713.4752,"change_from_open":69.235924933},{"ticker":"NASDAQ:BPTH","name":"BPTH","close":1.19,"gap":50.3582755785,"relative_volume_10d_calc":739.1336072032,"change":39.7862093269,"premarket_change":50.3582755785,"float_shares_outstanding":2550487.68927,"change_from_open":-7.03125},{"ticker":"AMEX:RHE","name":"RHE","close":2.48,"gap":12.6373626374,"relative_volume_10d_calc":1352.2586177328,"change":36.2637362637,"premarket_change":14.2857142857,"float_shares_outstanding":1699040.22617,"change_from_open":20.9756097561},{"ticker":"NASDAQ:XRTX","name":"XRTX","close":1.8,"gap":-0.6535947712,"relative_volume_10d_calc":7.2865541922,"change":17.6470588235,"premarket_change":null,"float_shares_outstanding":2698095.96538,"change_from_open":18.4210526316},{"ticker":"OTC:RLFTF","name":"RLFTF","close":4.91,"gap":25.1445086705,"relative_volume_10d_calc":7.2145669291,"change":41.9075144509,"premarket_change":null,"float_shares_outstanding":8255497.121424,"change_from_open":13.3949191686}]