I have three lists that holds the number of data in a database
List<Long> list1= list1Repo.countAll();
List<Long> list2= list2Repo.countAll();
List<Long> list3= list3Repo.countAll();
I want to combine these lists into one JSON object which supposed to be as follows:
[
{ label: "list1", value: 30 },
{ label: "list2", value: 25 },
{ label: "list3", value: 25 },
]
value is the counted numbers inside the lists. How do i do this?