Assuming all else is created equal as my example a...
# suitescript
e
Assuming all else is created equal as my example above, where we're using the same
toObject
function to translate a
Result[]
into an
Object[]
, then with
each
, the
findCustomers
function looks more like
Copy code
const findCustomers = () => {
  let mappedResults = [];
  let searchResults = s.create(...)
    .run()
	.each((r) => {
      mappedResults.push(toObject(r));
    });
}