напиши функцию на javascript, которая будет преобразовывать такого вида массивы - ["DCU_DLMS","Parameters","General","Read",["Get Version","Get Date & Time"],"Write",["Alert","Get Version","Get Date & Time"]], в такой вид - 
{"General":{"Write":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1,"actions":[{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0}]},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}],"Read":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}]},"Instantaneous":{"Write":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1,"actions":[{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0}]},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}],"Read":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}]},"Positive":{"Write":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1,"actions":[{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0}]},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}],"Read":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}]},"Negative":{"Write":[{"name":"Get Date & Time","value":0,"confirm":1},{"name":"Alert","value":0,"confirm":1,"actions":[{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0},{"name":"action","value":0}]},{"name":"Get Version","value":0,"confirm":1},{"name":"Get DST Settings","value":0,"confirm":0},{"name":"Parameters","value":0,"confirm":0},{"name":"Meter ID","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0},{"name":"Get Date & Time","value":0,"confirm":0}],"Read":[{"name":"Get