
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alternate or multiple Field name mapping in JSON
so I m trying to extract JSON data submitted via API calls & it is working fine,
what I want to do it little bit more flexible & parse data even field names are little different to up-to certain extent,
Such as
- 'Name' fieldname - it should even accept & map field names such as name, NAME etc..to Name field data
- 'Address' fieldname - it should even accept & map field names such as address, ADDRESS, address1, Address1 etc..to Address field data
- 'Zip' fieldname - it should even accept & map field names such as ZIP, POSTALCODE, zip, postalcode etc..to Zip field data
and I know field names are case sensitive here that means even if client pass data as 'name' or 'NAME' instead of 'Name' field name, data doesn't get mapped.
Basically Is there a way to map multiple field names to one field or specify alternate field names in JSON mapping?
Here is the current field mapping,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Since the component will work on schema based approach, you will not be able to chnage field names on the fly. At the same time, you can try to replace the matching values for field names before sending the data for parsing.
For this case, you will have to do a search and replace for the values using regular expressions (Hints:- refer java regular expressions in java forums) for the entire input JSON string.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Nikhil, I am referring to this (highlighted below), if we can use this by by means & mention field alternate field names
ref - http://umashanthan.blogspot.com/2015/11/json-path-expression-for.html
