Conversation
Module 5/Problem 1/problem1.json
Outdated
| "address": "=concat(@(1,address.street),' ',@(1,address.city), ' ', @(1,address.state), ' ',@(1,address.zip))", | ||
| "fullname": "=concat(@(1,firstName),' ',@(1,lastName))" | ||
| }, | ||
| "itemTemp": "@(1,items)" |
There was a problem hiding this comment.
It can be easily done without creating a duplicate of the 'items' list. Please optimize this.
Module 5/Problem 5/problem5.json
Outdated
| "email": "email", | ||
| "address": { | ||
| "city": "city", | ||
| "zip": "zip" |
There was a problem hiding this comment.
Can we use & here for all RHS values?
Module 5/Problem 6/problem6.json
Outdated
| "name": "[#2].Name", | ||
| "hobbies": { | ||
| "*": { | ||
| "name": "[#4].Hobbies" |
There was a problem hiding this comment.
& is preferred over # to define levels.
Module 5/Problem 8/problem8.json
Outdated
| "employees": { | ||
| "[0]": { | ||
| "bonus": 1000, | ||
| "tempBonus": 1000 |
There was a problem hiding this comment.
Can be optimized. No need to create a bonus duplicate.
Module 5/Problem 10/problem10.json
Outdated
| "spec": { | ||
| "fullname": "=split(' ',@(2,name))", | ||
| "first_name": "=firstElement(@(2,fullname))", | ||
| "last_name": "=lastElement(@(2,fullname))", |
There was a problem hiding this comment.
It is giving the desired output but 2 is not the correct level here. Please check.
Module 5/Problem 12/problem12.json
Outdated
| "employee": { | ||
| "name": "&", | ||
| "address": "&", | ||
| "phones": "&" |
Module 5/Problem 14/problem14.json
Outdated
| "*": { | ||
| "id": "employees.[#2].&", | ||
| "name": "employees.[#2].&", | ||
| "department": "employees[#2].&", |
There was a problem hiding this comment.
The use of wildcards is recommended over manually writing fields. Need to correct this in many other places.
Module 5/Problem 15/problem15.json
Outdated
| } | ||
| }, | ||
| { | ||
| "operation": "sort" |
Module 5/Problem 29/problem29.json
Outdated
| "spec": { | ||
| "*": "&", | ||
| "person-address": { | ||
| "*": "person-address-&" |
There was a problem hiding this comment.
Please reduce the number of operations.
Module 5/Problem 30/problem30.json
Outdated
| "operation": "shift", | ||
| "spec": { | ||
| "employee": { | ||
| "name": "&", |
Module 5/Problem 33/problem33.json
Outdated
| "*": { | ||
| "id": "@(3,id)", | ||
| "hobby_name": "@(1,name)", | ||
| "hobby_level": "@(1,level)", |
There was a problem hiding this comment.
Can be more optimized. Please check.
Module 5/Problem 27/problem27.json
Outdated
| "Country": "Canada" | ||
| }, | ||
| "[2]": { | ||
| "Country": "NA" |
There was a problem hiding this comment.
Indexing is hard coded. Make sure your spec is always loosely written, so that even if there are more fields you don't have to change the approach.
| }, | ||
| "[2]": { | ||
| "bonus": 900, | ||
| "tempBonus": 900 |
There was a problem hiding this comment.
In this, the bonus is related to the department in some way. You can add that approach also.
Completed: Module 5
Solved all 34 problems
Learnt the following things in the module about Jolt: