У меня есть следующий php-код:
echo(json_encode(array('msg'=>'7','result'=>$list)));
он возвращает следующий json с ajax:
msg 7
result […]
0 {…}
0 2
1 Family, Release
2 test 2 v/s test 3
3 this is the test for judgment file 2
4 null
5 2019-10-10 10:10 PM
6 1
7 null
8 1
sno 2
keywords Family, Release
case_title test 2 v/s test 3
law this is the test for judgment file 2
judgment_file null
added_on 2019-10-10 10:10 PM
added_by 1
user_ip null
is_confirmed 1
1 {…}
0 3
1 Family
2 Test 3 V/S Test 4
3 this is tthird record
4 null
5 2019-10-10 10:10 PM
6 1
7 null
8 1
sno 3
keywords Family
case_title Test 3 V/S Test 4
law this is tthird record
judgment_file null
added_on 2019-10-10 10:10 PM
added_by 1
user_ip null
is_confirmed 1
Проблема № 1 = он возвращает результат одной строки дважды, т.е. с 0, 1, ... 8 в то время как с именами полей таблицы, т.е. sno = 2 ключевые слова = xxx
Мне нужно получить один результат для каждой строки.
Проблема № 2 = как получить всеполя из json с javascript / jquery
Кто-нибудь поможет?