Json and ajax

Hi guys,
I'm about to lose my mind :).

I have asp.net mvc project and I'm returning json to ajax call from the controller.
Look at my backend method:
public JsonResult Nexttostep8(string manu)
var supllst = (from i in dbh.Items
                               join s in dbh.SupplierLists on i.ID equals s.ItemID
                               join sa in dbh.Suppliers on s.SupplierID equals sa.ID
                               where i.ItemLookupCode == "050326120180"
                               select new

                foreach (var item in supllst)
                    var i = new suppliersmodel();
                    i.SupplierName = item.SupplierName;
                    i.ReorderNumber = item.ReorderNumber;
                    i.MinimumOrder = item.MinimumOrder;
                    i.MasterPackQuantity = item.MasterPackQuantity;
                    i.Customtext5 = item.CustomText5;

                    if (item.CustomText5 == "LOCAL")
                        i.Cost = item.Cost;
                        i.LocalCost = item.Cost;
                        i.Cost = item.Cost;
                        i.LocalCost = item.Cost * Convert.ToDecimal(0.84);

return Json(lstsupliers, JsonRequestBehavior.AllowGet);

Open in new window

Here is my ajax call example:
function Nexttostepeight() {
    var manu = $("#textmanufactureid").val();
        type: "POST",
        url: "/PIM/Nexttostep8",
        dataType: "json",
        data: { manu: manu },
        success: function (data) {
            $('#step7').css('backgroundColor', '#2ECCFA')
            $('ul.setup-panel li:eq(7)').removeClass('disabled');
            $('ul.setup-panel li a[href="#step-8"]').trigger('click');
            $("#manufacturerprogresid").show().html("<strong>MANUFACTURER:</strong> " + manu);
            var suplier = '';
            for (var i = 0; i < data.length; i++) {
                var dt1 = data[0].SupplierName;
                var dt2 = data[1].ReorderNumber;
                var dt3 = data[2].MinimumOrder;
                var dt4 = data[3].MasterPackQuantity;
                var dt5 = data[4].Customtext5;
                var dt6 = data[5].Cost;
                var dt7 = data[6].LocalCost;

Open in new window

The issue I'm facing here is - I'm getting the first properties just fine, but the rest come with error.
"Cannot read property 'MinimumOrder' of undefined"

Please, HELP.
Moti Mashiah.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Moti Mashiah.NET DeveloperAuthor Commented:
I solved the issue.

I just had to change the array to 0  in all fields as it is the first object in json data. I learn something today :).:
 var dt1 = data[0].SupplierName;
            var dt2 = data[0].ReorderNumber;
            var dt3 = data[0].MinimumOrder;
            var dt4 = data[0].MasterPackQuantity;
            var dt5 = data[0].Customtext5;
            var dt6 = data[0].Cost;
            var dt7 = data[0].LocalCost;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.