Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- presupuesto = [ { "id" : 5 , "cant" : 222 } , { "id" : 33 , "cant" : 111 } ]
- encontrado = presupuesto.filter( ( x ) => {
- if( x.id == 5 )
- return x;
- });
- if( encontrado.length == 1 ) {
- encontrado[0].cant = 123456789;
- localStorage.set( "loQueSea" , presupuesto );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement