Hi,
I am trying to work on a template to use mustache fields with looping and providing the data in JSON format in Ruby. For test purposes, I tried using this template that is there in your GitHub repo and used data as which I made by trying to replicate the XMLdata mentioned in your docs.
{
"Order": [
{
"Address": {
"Number": "23",
"Street": "Nelson Street",
"Suburb": "Howick",
"City": "Auckland"
},
"PhoneNumber": "543 1234",
"Date": "03/01/2010",
"Total": "14.00",
"Item": [
{
"Name": "BBQ Chicken Pizza",
"Price": "6.00",
"Quantity": "1",
"ItemTotal": "6.00"
},
{
"Name": "1.5 Litre Coke",
"Price": "4.00",
"Quantity": "2",
"ItemTotal": "8.00"
}
]
},
{
"Address": {
"Number": "10",
"Street": "Parkville Avenue",
"Suburb": "Pakuranga",
"City": "Auckland"
},
"PhoneNumber": "548 7342",
"Date": "05/03/2010",
"Total": "6.00",
"Item": [
{
"Name": "Hawaiian Pizza",
"Price": "4.00",
"Quantity": "1",
"ItemTotal": "4.00"
},
{
"Name": "Fries",
"Price": "1.00",
"Quantity": "2",
"ItemTotal": "2.00"
}
]
}
]
}
OR
{
"Orders": {
"Order": [
{
"Address": {
"Number": "23",
"Street": "Nelson Street",
"Suburb": "Howick",
"City": "Auckland"
},
"PhoneNumber": "543 1234",
"Date": "03/01/2010",
"Total": "14.00",
"Item": [
{
"Name": "BBQ Chicken Pizza",
"Price": "6.00",
"Quantity": "1",
"ItemTotal": "6.00"
},
{
"Name": "1.5 Litre Coke",
"Price": "4.00",
"Quantity": "2",
"ItemTotal": "8.00"
}
]
},
{
"Address": {
"Number": "10",
"Street": "Parkville Avenue",
"Suburb": "Pakuranga",
"City": "Auckland"
},
"PhoneNumber": "548 7342",
"Date": "05/03/2010",
"Total": "6.00",
"Item": [
{
"Name": "Hawaiian Pizza",
"Price": "4.00",
"Quantity": "1",
"ItemTotal": "4.00"
},
{
"Name": "Fries",
"Price": "1.00",
"Quantity": "2",
"ItemTotal": "2.00"
}
]
}
]
}
}
Both of which didn’t work and I got AsposeWordsCloud::ApiError (Internal Server Error)
for them. Let me know the issue. Also, I am eventually trying to use images in a loop but once I understand this and make this work, I will ask that if needed.
Thanks
Nikhil