Create Json in jquery : i need create json code in each loop for read my input data like this but i I do not know.

    {
  "element1": {
    "type": "text",
    "id": "1"
  },
  "element2": {
    "type": "text",
    "id": "1"
  },
  "element3": {
    "type": "text",
    "id": "1"
  }
}