Q:

Jquery returns value "undefined" .net core

I want to populate second dropdown from first one.
It all works but city names and values just returns "undefined". *Number of cities returns correct but the name and value are always "undefined". *
Controller:
    [HttpPost]
    public ActionResult getCityJson(string stateId)
    {
        int _stateid = Convert.ToInt32(stateId);
        List<Cities> objcity = new List<Cities>();
        objcity = _db.Cities.Where(m => m.stateID == _stateid).ToList();
        SelectList obgcity = new SelectList(objcity, "CityID", "CityName", 0);
        return Json(obgcity);
    }

View Page:
    $("#istateid").change(function () {
        var id = $("#istateid").val();
        $.ajax({
            url: '@Url.Action("getCityJson", "Home")',
            data: { stateId: id },
            cache: false,
            type: "POST",
            success: function (data) {
                var markup = "<option value='0'>Select City</option>";
                for (var x = 0; x < data.length; x++) {
                    markup += "<option value=" + data[x].Value + ">" + data[x].Text + "</option>";
                }
                $("#icityid").html(markup).show();
            },
            error: function (reponse) {
                alert("error : " + reponse);
            }
        });
    });

I also tried Public JsonResult and return JsonResult and Public Selectlist and return SelectList but none of them worked.
And I also tried this:
 $("#istateid").change(function () {
 $.ajax({
 type: "POST",
 url: '@Url.Action("getCityJson", "Home")',
 data: { stateId: $("#istateid > option:selected").attr("value") },
 success: function (data) {
   var items = [];
   items.push("<option>--Choose Your City--</option>");
   $.each(data, function () {
       items.push("<option value=" + this.Value + ">" + this.Text + "</option>");
   });
   $("#icityid").html(items.join(' '));
  }
}) });

I recieve this in browser:
(TypeError: data[x] is undefined.)
    $("#istateid").change(function () {
        var id = $("#istateid").val();
        $.ajax({
            url: '/Home/getCityJson',
            data: { stateId: id },
            cache: false,
            type: "POST",
            success: function (data) {
                var markup = "<option value='0'>Select City</option>";
                for (var x = 0; x < data.length; x++)
                { markup += "<option value=" + data[x].CityID + ">" + data[x].CityName + "</option>"; }
                $("#icityid").html(markup).show();
            },
            error: function (reponse) {
                alert("error : " + reponse);
            }
        });
    });

<option value="0">Select City</option>
<option value="undefined">undefined</option>
<option value="undefined">undefined</option>
<option value="undefined">undefined</option>

A:

Solved: 
items.push("<option value=" + this.value + ">" + this.text + "</option>");

Value and text camel cased.
Special thanks to @agua from mars
Other codes I tried:
      $("#istateid").change(function () {
      $.ajax({
         type: "POST",
         url: '@Url.Action("getCityJson", "Admin")',
         data: { stateId: $("#istateid > option:selected").attr("value") },
         success: function (data) {
         var items = [];
          items.push("<option>--Choose Your Area--</option>");
          $.each(data, function () {
            items.push("<option value=" + this.Value + ">" + this.Text + "</option>");
           });
          $("#icityid").html(items.join(' '));
         }
       })
      });

Controller:
    [HttpPost]
    public JsonResult getCityJson(string stateId, string selectCityId = null)
    {
        return Json(getCity(stateId, selectCityId));
    }
    public SelectList getCity(string stateId, string selectCityId = null)
    {
        IEnumerable<SelectListItem> cityList = new List<SelectListItem>();
        if (!string.IsNullOrEmpty(stateId))
        {
            int _stateId = Convert.ToInt32(stateId);
            cityList = (from m in db.Cities where m.StateID == _stateId select m).AsEnumerable().Select(m => new SelectListItem() { Text = m.CityName, Value = m.CityID.ToString() });
        }
        return new SelectList(cityList, "Value", "Text", selectCityId);
    }

