After generating Json Data from a PHP API, I attempted to formulate a MYSQL Query and PHP Script to achieve my desired outcome. However, the process has become overly complex.
$data1 = [
{
"IDa": "6",
"IDusr": "1",
"doc_name": "name_doc.jpg",
"doc_type": "doc"
},
{
"IDa": "7",
"IDusr": "1",
"doc_name": "nameOne.jpg",
"doc_type": "jpg"
},
]
$data2 = [
{
"IDa": "8",
"IDusr": "1",
"doc_name": "nameTwo.jpg",
"doc_type": "jpg"
},
{
"IDa": "9",
"IDusr": "1",
"doc_name": "nameThr.jpg",
"doc_type": "jpg"
},
]
$data3 = [
{
"IDa": "10",
"IDusr": "1",
"doc_name": "nameOne_doc.jpg",
"doc_type": "doc"
},
]
$data4 = [
{
"IDa": "11",
"IDusr": "1",
"doc_name": " ",
"doc_type": "null"
},
]
From the provided json data, I aim to display specific products as follows:
From $data1, only show IDa = 7
From $data2, show IDa = 8 and 9
From $data1, only show IDa = 10
From $data1, only show IDa = 11
Is it achievable using Angular ng-if in AngularJS or is there an alternative approach?
Your assistance is greatly appreciated.