using Microsoft.AspNetCore.Mvc; namespace BpsRwApp.Controllers { [Route("[controller]/[action]")] public class DataRtController : AppControllerBase { public IActionResult Index() { return View(); } [HttpGet] public IActionResult Table() { var data = new[] { new { rt = "001", rw = "001", kecamatan = "Kebayoran", }, new { rt = "002", rw = "001", kecamatan = "Tebet", }, new { rt = "003", rw = "001", kecamatan = "Menteng", }, new { rt = "004", rw = "001", kecamatan = "Cilandak", }, new { rt = "005", rw = "001", kecamatan = "Setiabudi", }, new { rt = "006", rw = "001", kecamatan = "Gambir", }, new { rt = "007", rw = "001", kecamatan = "Cakung", }, new { rt = "008", rw = "001", kecamatan = "Kelapa Gading", }, new { rt = "009", rw = "001", kecamatan = "Pancoran", }, new { rt = "010", rw = "001", kecamatan = "Tanah Abang", }, }; var response = new { data = data }; return Json(response); } } }