There was a need to search in the array by key. An example of php I would do

$some=array('movie'=>'фильм','music'=>'музыка'); $some['movie']; 

How can this be done on jQuery?


    1 answer 1

     var some={'movie':'фильм','music':'музыка'}; some['movie']; 

    ps I apologize not immediately noticed that you need jQuery:

     $(document).ready(function(){ $.extend({movie:'фильм'},{music:'музыка'}).movie; }); 
    • . some.movie - Zowie
    • one
      it is possible and so, now I will write a variant on jquery, otherwise it turned out to be fine) - FLK
    • Actually it is not possible but necessary , JS! = Php, LOL - Zowie