JSONSerialize Fields
Question
Application Type
Reactive

Hi,

Application : Reactive Application

I have 2 entity records

Entity1 => id, Name, field1, field2, field2, uploadedBy, cretedOn

Entity2 => id, Name, field1, field2, field2, uploadedBy, cretedOn

I wanted to Serialize field1, field2, field2 only for both Entity and compare if they are same or not?

How to achieve this if some demo .oml will help

Thanks....

mvp_badge
MVP

Hi,

You could create a structure that has only the attributes that you need to serialize. First map the record attributes on the attributes of a local variable based on the structure. Then serialize the structure.

Regards,

Daniel

Hi Daniel,

Thanks for your suggestion. Can you please send me the demo .olm that will helpful.

Thanks a lot...

mvp_badge
MVP

Sorry, I don't have time for that, why don't you just try my or Dorine's suggestion?

Learn by trying things out

Hi Rohan,

alternatively, if both your records are in the database, retrieve them with sql widget, doing a FOR JSON AUTO.  You can limit the sql select clause to those fields you want to compare, and you can directly compare the output of both queries.

Kind Regards,

Dorine

Hello Rohan,

Taking Daniel solution, I have implemented and created a sample OML

Attaching the same.

Hope it helps.


JSONSerializeDemo.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.