Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: jmokHi Buddha,
Thanks for putting your question on here. To split your address string by a space, you'll want to use the 'split' and 'getItem' functions within a Filter node, to get the result you've specified.
Please copy and paste the below onto your Lavastorm canvas:
------------------------
node:Split_and_getItem
bretype:core::Filter
editor:Label=Split and getItem
editor:sortkey=58c28d967ab669b9
input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
output:@40fd2c7420761db6/=
prop:Script=<<EOX
# Split the string into a list of parts and using the getItem function to specify
# which element (part) you would like. 0 always being the first part on the left
c1 = 'Data'.split(" ").getItem(0)
c2 = 'Data'.split(" ").getItem(1)
c3 = 'Data'.split(" ").getItem(2)
c4 = 'Data'.split(" ").getItem(3)
c5 = 'Data'.split(" ").getItem(4)
c6 = 'Data'.split(" ").getItem(5)
# emit all variables to view in the ouput
emit *,c1,c2,c3,c4,c5,c6
EOX
editor:XY=210,80
end:Split_and_getItem
node:Static_Data
bretype:core::Static Data
editor:sortkey=58c28d59334d1966
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
Data:string
00 smith st Melbourne Vic 3000
EOX
editor:XY=100,80
end:Static_Data
------------------------
Hope that works and if you have any questions, let us know