08-31-2020 10:47 AM
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?
08-31-2020 12:31 PM
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.
09-02-2020 02:53 PM
$.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)