The following problem is happening inside of Informatica CAI. Here I only have access to Xquery to edit variables and construct data.
I am attempting to map a JSON's attribute names into numbers. A readable example of this problem is a input/temp/output variable $json
being equal to
{
"Person":
{
"Name": "Jerry",
"Age": "42"
}
}
and a temp variable $MapTable
{
"Name": "3456_1",
"Age": "3456_2"
}
When attempting to map the numbers from $MapTable to take the place of "Name" and "Age" in $json with Xquery, I receive a "Invalid element name. Invalid QName {3456_1}" error." I believe this is due to XML name regulations.
Does anyone know of a way around this so I can end up with $json being equal to
{
"Person":
{
"3456_1": "Jerry",
"3456_2": "42"
}
}
Note: I've posted the same question on Informatica's Cloud Application Integration Forum.