I have two controller

1. Settings Controller

Action - GetAvailableLocationsFor
2. HomeController

Action - Index

Steps I want to acheive

1. Make ajax call to `GetAvailableLocationsFor` and then get the object data from success call back. No view is required for this Action.
2. Now with the object data received make another ajax call to Index Action in HOMECONTROLLER and pass the object there.

Below is what I could achieve.

**HomeController - GetAvailableLocationsFor**

```
public ActionResult GetAvailableLocationsFor(int accountId, int groupId)
        {
            FullConfigMV configData = SetLoader.GetSettings(accountId, groupId);
           return // HOW TO RETURN configData from Here to first ajax call
}

```

**HomeController - Index Action**

```
[HttpPost]
public ActionResult Index(FullConfigMV data)
{
  //SECOND AJAX CALL SHOULD COME HERE
}

```

**Nested Ajax call**

```
<script>
    $(document).ready(function()
    {
        $("#tan").change(function()
        {
            alert(this.value);
            $.ajax({
                type: 'POST',
                url: '/Settings/GetAvailableLocationsFor',
                data: { accountId: 28462, groupId: 35},
                success: function (data) { // data should represent configObj

                    $.ajax({
                        type: 'POST',
                        url: '/Home/Index',
                        data: // WHAT TO WRITE HERE,
                        success: function (data) {
                            //WHATEVER
                        },
                        error: function () {
                            DisplayError('Failed to load the data.');
                        }
                    });

                },
                error: function () {
                    DisplayError('Failed to load the data.');
                }
            });

        });
    });
</script>

```