1

I have complex JSON structure with arrays.Please let me know if there is way to design entity in JDL studio for same.

Below is an example of JSON I'd like to have generated. Keys in the JSON are dynamic.

 {
  "_id" : ObjectId("71testsrtdtsea6995432"),
  "HotelName": "Test71testsrtdtsea699fff",
  "Description": ".....",
  "Address": {
    "Street": "....",
    "City": "....",
    "State": "...."
  },
  "Rooms": [
    {
      "Description": "......",
      "Type": ".....",
      "Price": "....."
      "Availability": [
            true,
            false
          ]
    },
    {
      "Description": "......",
      "Type": "....",
      "Price": "..."
      "Availability": [
            true,
            false
          ]
      "newDynamickey": [
            {}
          ]
    },
  ]
  "AdditionalData": [
    {
        "key1": "Vlaue1",
        "key2":"Value2"
    },
    {...}
  ]
}
Pradeep Nooney
  • 740
  • 10
  • 12

1 Answers1

0

There shouldn't be any problem with creating that structure with JDL Studio. Just use ManyToMany and ManyToOne relationships for your Arrays and everything should be alright.

Alexandre GC
  • 553
  • 3
  • 8