Append vs Overwrite Contact Notes field?

The scriptable app can finally access Contact entry notes in iOS. This script now works: Edit Contact Field by @simonbs

But this script does a lot, including loading and then overwriting the contact notes.

What I would like to do is send a block of text, and a contact record reference (name?) to scriptable, and then have that text appended to the notes of that contact.

What does that javascript look like?

Thank you,


Well, the notes field is represented as a string. So you can append to it.
Are you a beginner to js?

I would do it as follows:

  1. get all contacts
  2. select contact
  3. enter note
  4. update contact
  5. persist changes