Good morning, could someone help me out with .loda...
# suitescript
n
Good morning, could someone help me out with .lodash? I have a challenge when merging 2 arrays(search functions with value results) and then iterating though by
_.groupBy
I've never used it before, and the returned object looks weird to me too. Returned Objects values results:
Copy code
[[{"values":{"GROUP(job.entitynumber)":"9712","SUM(formulanumeric1)":"109","SUM(formulanumeric2)":"2078","SUM(formulanumeric3)":"484","SUM(formulanumeric4)":"363.5"}}],[{"values":{"GROUP(job.entitynumber)":"9712","SUM(formulanumeric5)":"1135"}}]]
Lodash:
Copy code
lodash.groupBy([findTime1(),findTransaction()], [iteratee=_.identity("GROUP(job.entitynumber)")]);
I'm making a mistake here, as I should be iterating though the
"values"
, and then
"GROUP(job.entitynumber)"
as the key. How do I do this correctly?