pass Iteration to external function

by Faisal Khan Janjua

HTML

<button>Click</button>
<div class="body">

</div>

CSS

.body * {
  margin: 0;
  display: block;
}

.red {
  color: #F00;
}

JavaScript

var sConfig = {
  "step": [
    {
      "fields":[
        {
          "fieldType": "heading",
          "headingText": "This is title of the current field",
          "headingSpan": "sometext in span",
          "description": "Here is the paragraph of the form in full field in the text line and it can appear in the form fields.",
          "fieldComment": {
            "commentText": "Click here to Download sample .csv file.",
            "anchorText": "Download sample",
            "url": "http://www.google.com"
          }
        },
        {
          "fieldType": "aside",
          "headingText": "This is title of the current field",
          "headingSpan": "sometext in span",
          "description": "Here is the paragraph of the form in full field in the text line and it can appear in the form fields.",
          "fieldComment": {
            "commentText": "Click here to Download sample .csv file.",
            "anchorText": "Download sample",
            "url": "http://www.google.com"
          }
        }
      ]
    },
    {
      "fields":[
        {
          "fieldType": "heading",
          "headingText": "This is title of the current field",
          "headingSpan": "sometext in span",
          "description": "Here is the paragraph of the form in full field in the text line and it can appear in the form fields.",
          "fieldComment": {
            "commentText": "Click here to Download sample .csv file.",
            "anchorText": "Download sample",
            "url": "http://www.google.com"
          }
        },
        {
          "fieldType": "aside",
          "headingText": "This is title of the current field",
          "headingSpan": "sometext in span",
          "description": "Here is the paragraph of the form in full field in the text line and it can appear in the form fields.",
          "fieldComment": {
            "commentText": "Click here to Download sample .csv file.",
            "anchorText": "Download sample",
       ...