Skip to content

XML to JSON #5178

Answered by LanciaH
LanciaH asked this question in Q&A
May 6, 2022 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

I used a Transformer to convert the XML into JSON, so far so good.
Thanks all

var jsEntity = GetEntities();
  
  var jsMedications = GetMedications();
  jsMedications.name = msg['name'].toString();
  jsMedications.parentid = msg['parentid'].toString();
  jsMedications.externalid = msg['externalid'].toString();
  
 

  jsEntity.entities.push(jsMedications);  // ADD IT TO THE ENTITY ARRAY
  channelMap.put('Entity_Locations',JSON.stringify(jsEntity));

  
  
//=============================
function GetEntities()
{
  var jsData = 
	{
	  entities: []
	};

  return jsData;
}

//===========================
function GetMedications()
{
  var jsData = 
	{
	 name: "",
      parentid: "",
      exter…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@pacmano1
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@LanciaH
Comment options

@FTK7
Comment options

@LanciaH
Comment options

@FTK7
Comment options

@LanciaH
Comment options

Answer selected by LanciaH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants