title: How to dynamically add attribute and value in json data
body: <pre><code>[{"id":2,"name":"Paypal"},{"id":3,"name":"Scrill"}]
  </code></pre>
  
  <p>How to add dynamically new attribute and its value in here using php or in laravel framework. converted data is like</p>
  
  <pre><code>[{"id":2,"name":"Paypal","amount":"100"},{"id":3,"name":"Scrill","amount":"200"}]
  </code></pre>