How to get the list of keys in an object using keysOf function in Dataweave

In this article, let us find out the quickest way to get the list of all the keys present in a JSON object. The keysOf function in Dataweave which returns the array of keys in an object was introduced in DataWeave 2.3.0. Supported by Mule 4.3

It accepts Object as input and returns Array of keys as output.



Also read: How to merge two JSON payload in Mule 4 Dataweave

Example of keysOf function in Dataweave:



Syntax of keysOf function:


keysOf(Object)

Post a Comment

0 Comments