Create a Hash Two Objects

Although there is no direct way to create a hash, it is possible to create a Base64 string, such that multiple properties in an object can be combined together and then a Base64 string created on top that can be used as a hash.

For instance, the following JSONata was used to generate an unique hash from latitude and longitude contained within the msg.payload object as an array in order to achieve an unique plot of geolocations that can then be referenced by an unique name:

$base64encode($join([$string(msg.payload[0]), $string(msg.payload[1])]))	

where:

  • msg.payload[0] and msg.payload[1] contain (in this case) numbers

It is of course possible to scale the hashing function to any number of properties just by extending the array.


fuss/jsonata.txt ยท Last modified: 2025/05/15 12:08 by office

Wizardry and Steamworks

© 2025 Wizardry and Steamworks

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.