I have the following array of objects:
[{
"Lines": [{
"Month": 10,
"Year": 2017,
"CompletionPercentage": 30
}]
}, {
"Lines": [{
"Month": 10,
"Year": 2017,
"CompletionPercentage": 30
}, {
"Month": 6,
"Year": 2017,
"CompletionPercentage": 30
}, {
"Month": 12,
"Year": 2017,
"CompletionPercentage": 40
}]
}]
I need to convert each line property to a separate javascript array
Line1 must be
[
["10-2017", 30]
]
Line2 must be
[
["10-2017", 30],
["6-2017", 30],
["12-2017", 30]
]
How can I achieve that?