Customised xml using JSON object

I am trying to create a customised xml with the help of JSON object. Below is my data.

var data = {
  "title": {
    "type": "object",
    "properties": {
      "firstName": {
        "type": "string"
      },
      "lastName": {
        "type": "string"
      },
      "age": {
        "description": "Age in years",
        "type": "integer",
        "minimum": 0
      }
    },
    "required": {
      details: {
        Questions: [
          {
            othersTitle: "mr",
            title: "aa",
            firstName: "xyz"
          },
          {
            othersTitle: "mrs",
            title: "bb",
            firstName: "abc"
          }
        ]
      }
    }
  }
}
var dataPath = data.required.details.Questions[].title;

Since there are two datas in an array, how can I create two xml tag.

var xmlPath = userDetails[0].custInfo[].userList.title;

I have added my small piece of logic JSFIDDLE on how I am creating a single xml tag with one JSON array data. How can I make my call recurisve to create mutiple xml for serval array data. Any help on this will be really helpful.