Mule4 - Dataweave - use of read, fromBase64, valuesOf
Scenario: Assuming that there is base64 encoded string containing values separated by tab(\t) and each row is separated by new line(\n) without any headers, how to extract and build json with predefined index mapped to particular attribute name. Lets assume 0 index is firstName, 1st Index is lastName 2nd Index is customerId. Sample Data: Mule\t Soft\t aa234ed23e Lets encode the above data to base64: TXVsZVx0U29mdFx0YWEyMzRlZDIzZQ== Now using dataweave functions read, fromBase64 and valueOf , extract and build json.