Remove first value from array of object - Javascript Array Operation

Javascript examples for Array Operation:Array of Object

Description

Remove first value from array of object

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
var i = [/*from w  w  w .  jav a  2 s  .c  o m*/
    [{
        "invoice": 1,
        "article": "ff",
        "qty": "0"
    }, {
        "invoice": 1,
        "article": "Coca Cola",
        "qty": "33"
    }, {
        "invoice": 1,
        "article": "Fanta",
        "qty": "2"
    }],
];
console.log(i);
i = i.shift();
i.shift();
console.log(i);

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials