For example - I have the following data This below values are in an array it is not key and value.
tier2_rightend: 10766
tier1_rightend: 10766
tier1_leftend: 2719
tier1_leftstart: 1
tier2_maxjunctions: 2
tier2_leftend: 2719
tier2_leftstart: 1
tier2_minjunctions: 1
tier2_rightstart: 10275
tier1_minjunctions: 2
tier1_maxjunctions: 2
tier1_rightstart: 10275
I need the result in following format
tier1 = tier1_leftstart(value) - tier1_leftend(value) ,tier1_rightstart(value) -tier1_rightend(value)
So I need to have 4 arrays as tier1 left start tier1 left end Tier1 right start and tier1 right end
Also I need similar thing to be done for tier 2
Can can body help?
You could take two nested arrays for the key parts and create a new object with the result.