Convert Jotform Autocompleted Address to JSON
@pravin
code:
data:privatelast updated:3 years ago
today
Build integrations remarkably fast!
You're viewing a public workflow template.
Sign up to customize, add steps, modify code and more.
Join 800,000+ developers using the Pipedream platform
steps.
trigger
inactive
last updated:-last event:-
steps.
convert_address_to_json
auth
to use OAuth tokens and API keys in code via theauths object
params
Address

Send a test event to your trigger, and then enter the reference to the key which contains the address (e.g., event.formData.q1_typeA)

 
string ·params.address
code
Write any Node.jscodeand use anynpm package. You can alsoexport datafor use in later steps via return or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.
async (event, steps, params) => {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
}
15
const addressObj = {}
const address = params.address

const parsedAddress = address.split("\n").map(line => {
  return line.split(": ")
})

parsedAddress.forEach(line =>{
  addressObj[line[0]] = line[1]
  return addressObj
})

return addressObj