Thanks, it works!

On 29 окт, 15:33, Vladimir Tkach <tea...@gmail.com> wrote:
> nop but answer in english please
>
> thanks
>
> 2009/10/29 budarin <budari...@gmail.com>
>
>
>
>
>
> >  Спасибо Владимир, помогло!
>
> > *From:* prototype-scriptaculous@googlegroups.com [mailto:
> > prototype-scriptacul...@googlegroups.com] *On Behalf Of *Vladimir Tkach
> > *Sent:* Thursday, October 29, 2009 3:02 PM
> > *To:* prototype-scriptaculous@googlegroups.com
> > *Subject:* [Proto-Scripty] Re: Help me with hashes
>
> > var MyObj={
> >  obj1:{
> >   prop: ['А', 'C', 'D', 'E']
> >  },
> >  obj2:{
> >   prop: ['B', 'C', 'D', 'E']
> >  },
> >  obj3:{
> >   prop: ['А',  'E']
> >  },
> >  obj4:{
> >   prop: ['D', 'E']
> >  }
> > }
> > var newObj = {}
>
> > Object.keys(MyObj).each(function(k,v){
> >     MyObj[k].prop.each(function(x,y){
> >         if(typeof newObj[x]=="undefined"){newObj[x]=[]}
> >         newObj[x].push(k)
> >     })
>
> > })
>
> > newObj
>
> > 2009/10/29 Buda <budari...@gmail.com>
>
> > Help me please, this operation is best
>
> > I have an object
>
> > var MyObj:{
> >  obj1:{
> >   ...
> >   prop: ['А', 'C', 'D', 'E']
> >   ...
> >  },
> >  obj2:{
> >   ...
> >   prop: ['B', 'C', 'D', 'E']
> >   ...
> >  },
> >  obj3:{
> >   ...
> >   prop: ['А',  'E']
> >   ...
> >  },
> >  obj4:{
> >   ...
> >   prop: ['D', 'E']
> >   ...
> >  }
> > }
>
> > I neet to get a new hash like this
>
> > Props:{
> >  A: ['obj1', 'obj3'],
> >  B: ['obj2'],
> >  C: ['obj1', 'obj2'],
> >  D: ['obj1', 'obj2', 'obj4'],
> >  E: ['obj1', 'obj2', 'obj3', 'obj4'],
> > }
>
> > --
> > Best Regards,
> > Vladimir Tkach
>
> > +972-54-7574166
> > tea...@gmail.com
>
> >http://teamco-anthill.blogspot.com/
>
> >http://www.google.com/search?q=teamco-anthill&pov=1134850371164114785...
>
> --
> Best Regards,
> Vladimir Tkach
>
> +972-54-7574166
> tea...@gmail.com
>
> http://teamco-anthill.blogspot.com/
>
> http://www.google.com/search?q=teamco-anthill&pov=1134850371164114785...- 
> Скрыть цитируемый текст -
>
> - Показать цитируемый текст -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to