JavaScript JQuery for fetching ids of nodes in tree view structure to save data on the basis of ids jquery fetch node

Here m using angular to populate data in my view.. this is just a sample.. on clicking on the particular ageGroupCategory i need to add data into a form and then i want to save the entire data including the parent id of the nodes. help me with the JQuery code to fetch the Parent node ids.. as i m using ng-repeat directive of angular i cant get parent ids at child node.. help me with the suggestions..

<div> 
    <ul>
        <li id="{{sport._id}}" ng-repeat="sport in sports">
            <a>{{sport.sportsName}}</a>
            <ul>
                <li id="sub_{{subSport._id}}" ng-repeat="subSport in sport.subSports"> 
                    <a>{{subSport.subSportsName}}</a>
                    <ul>
                        <li id="age_{{ageGrp._id}}" ng-repeat="ageGrp in subSport.ageGroup">
                            <a>{{ageGrp.ageGroupName}}</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
    </ul>
</div>
Answer:1

how to sort the name in array list by alphabet in javascript, I tried with this code const sample = [ { name: "AddMain", mesg: "test000" }, { name: "Ballside", ...

how to sort the name in array list by alphabet in javascript, I tried with this code const sample = [ { name: "AddMain", mesg: "test000" }, { name: "Ballside", ...

I want left margin of every element in a class to have 70px left margin more than the last one. i.e. marginLeft += 70px; Here's what I have tried: function MarginLeftFunc() { var ...

I want left margin of every element in a class to have 70px left margin more than the last one. i.e. marginLeft += 70px; Here's what I have tried: function MarginLeftFunc() { var ...

How do I delete the created object "bird" from an array by name ie by the keyword "bird"? var storage = [ {cat: {name: "Garfild", count: 3443, price: 1000}} ]; function addProduct(...

How do I delete the created object "bird" from an array by name ie by the keyword "bird"? var storage = [ {cat: {name: "Garfild", count: 3443, price: 1000}} ]; function addProduct(...

If I create a inner class in a constructor, does it allocate memeory for each instance of the outer class that I create? For example, class PriorityQueue { constructor(maxSize) { // Set default ...

If I create a inner class in a constructor, does it allocate memeory for each instance of the outer class that I create? For example, class PriorityQueue { constructor(maxSize) { // Set default ...