you should probably do some js tutorials. I think you have your structure
wrong. You need a map that holds arrays:

$scope.rl = {
    chicken: [
          { .. object... },
          { ... object... }
    ],

   fish: [
          { .. object... },
          { ... object... }
    ]
}

add to the map:

$scope.rl.something = [] // an empty array of items (you havent inserted
any yet)

add to the array:

$scope.rl.something.push({
                            "item_name": "fish masala",
                            "item_type": "non-veg",
                            "description": "Nice cooked",
                            "features": "none",
                            "feel_name"
                                    : "chicken"
                        });


This means that you have a map of keys which can be looked up, which all
hold a set of objects. no?

On 18 January 2015 at 22:26, Rene Cimerlajt <[email protected]> wrote:

> Hi,
> If I understand you correctly, you want to do something like this:
>
> http://jsfiddle.net/joshdmiller/HB7LU/
>
>
>
> Dne ponedeljek, 19. januar 2015 03.19.12 UTC+1 je oseba jollu sandeep
> kumar napisala:
>
>> I need to insert dynamic key like shown in below
>>
>>  $scope.rI = [
>>                 {"*chicken*": [
>>                         {
>>                             "item_name": "chicken masala",
>>                             "item_type": "non-veg",
>>                             "description": "Chicken tikka masala",
>>                             "features": "none",
>>                             "feel_name": "chicken"
>>                         },
>>                         {
>>                             "item_name": "chicken tikka",
>>                             "item_type": "non-veg",
>>                             "description": "Chicken tikka is a chicken
>> dish ",
>>                             "features": "none",
>>                             "feel_name": "chicken"
>>                         }
>>                     ]
>>                 },
>>      {*"fish"*: [
>>                         {
>>                             "item_name": "fish masala",
>>                             "item_type": "non-veg",
>>                             "description": "Nice cooked",
>>                             "features": "none",
>>                             "feel_name"
>>                                     : "chicken"
>>                         }
>>                     ]}
>> ]
>>
>> ABOVE MENTION ARRAY I NEED TO INSERT RED MARKED DYNAMICALLY AND LATER
>> BLUE MARK DYNAMICALLY.
>> PLEASE WRITE JAVASCRIPT CODE TO PUSH OR INSERT DYNAMICALLY.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Tony Polinelli

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to