Need help to generate json format as per maximo target requirement

I have an input in below format:


which i need to transform into a json structure like below in order to load the asset to maximo, where highlighted ones are part of column list in input file and its corresponding value is to be saved in ALNVALUE column

I am not sure how to achieve this, can somebody help me with this?

When i tried with below logic i get output as follow:

jsonPath(.mapValues((value, key) => { ALNVALUE: parseFloat(value) || value, ASSETSTTRID:key}), "*")

which is not completely correct, i want highlighted assetnum, siteid, classstructureid outside the json path as mentioned in mapper snap.

Seems like i am missing somewhere a bit.

$.mapValues((value, key) => key==‘IsCritical’ || key==‘maoup’ || key==‘diame’?{AnnalValue:value,ASSETSTTRID:key} : “”).values().filter(x=>x!="")

Ignore the field names. Sample_2020_09_02.slp (3.7 KB)