title: AngularJS. Converting form fields to json
body: <p>Trying to understand how could be possible to write a function, (directive / controller) that would transform all my <code>form inputs</code> to json with current value that they have to <code>json</code>. </p>
  
  <p>The json would have a format similar to that:</p>
  
  <pre><code>{    
      fields: [
            {field1: value1},
            {field2: value2},
            {field3, value3}
          ]    
  }
  </code></pre>
  
  <p>Where to start from at least.. with no <code>jquery</code> applying?</p>