I need you to write javascript function which converts plain table data into tree-like structure performing grouping and sum calculation.
Sample input:
[{"taskName":"task 1","projectName":"project 1","memberName":"member1","timeSpentInMinutes":34,"costInUsd":10.10},{"taskName":"task 1","projectName":"project 1","memberName":"member2","timeSpentInMinutes":34,"costInUsd":10.10},{"taskName":"task 2","projectName":"project 1","memberName":"member2","timeSpentInMinutes":34,"costInUsd":10.10}]
Sample output:
[
"projectName": "project1",
"timeSpentInMinutes": 102,
"costInUsd": 30.30,
"members": [
{
"memberName": "member1",
"timeSpentInMinutes": 34,
"costInUsd": 10.10,
"tasks": [
{"taskName": "task 1", "timeSpentInMinutes": 34, "costInUsd": 10.10}
]
},
{
"memberName": "member2",
"timeSpentInMinutes": 68,
"costInUsd": 20.20,
"tasks": [
{"taskName": "task1", "timeSpentInMinutes": 34, "costInUsd": 10.10},
{"taskName": "task2", "timeSpentInMinutes": 34, "costInUsd": 10.10}
]
}
]
]
Budget is 10$. Easy money and feedback for experienced person.
Please let me know your experience with Javascript, JQuery, HTML and CSS as I have a few outstanding projects to do.
Hello innovativeWork, I have read your requirements and I am very confident to do this project. I guarantee COMPLETE satisfaction before payment. Please check PM for more details!