That's a lot of fun :nauseated_face:
# suitescript
k
That's a lot of fun 🤢
s
with NFT this comparison would be
_.isEqual(_.toPlainObject(rec1), _.toPlainObject(rec2))
k
Is this defined in SS 2.0?
s
_
is defined by lodash, and NFT presents NS records as normal javascript objects hence makes using
_.isEqual
possible.
k
When I tried that, I get an error that say
_
is not defined.
s
Yes, well if interested in this style of coding, take a look at the readme for NFT https://github.com/exploreconsulting/netsuite-fasttrack-toolkit-ss2
lodash (_) is one of the most popular libraries in the javascript community, if not the most popular (nontrivial) lib.
being able to naturally use lodash is part of the goal of NFT. Lodash brings dozens of high performance, unit tested functions to your SuiteScript toolkit. I highly recommend it standalone, but it works even better when coupled with NFT records and search result handling.