{
“status_code”:1,
“response”:[
{
“Title”:”Registration No:”,
“Value”:”56111″
},
{
“Title”:”Name:”,
“Value”:”FREIGHT “N” CUSTOM WINGS”
},
{
“Title”:”Business Name:”,
“Value”:”FREIGHT “N” CUSTOM WINGS”
},
{
“Title”:”Filing Status:”,
“Value”:”daata”
},
{
“Title”:”Filing Status Checking Date:”,
“Value”:”07,Aug,2024″
},
{
“Title”:”Note:”,
“Value”:”You can also check your ATL status by sending SMS, type ATL Registration Number (e.g.ATL 55454)and send SMS to 9964446.”
}
]
}
I have tried to tackle it with
ATLIncomeTax(data) {
this.resetTemporaryData();
this.isValidCaptcha=false;
this.api.GetData(data).subscribe({
next: (response: any) => {
try {
let cleanedResponse = response;
let parsedResponse = response;
if (typeof response === 'string') {
cleanedResponse = cleanedResponse.replace(/\([^u0000-u001Fu007F])/g, '\\$1'); // Ensure backslashes are properly escaped
cleanedResponse = cleanedResponse.replace(/[u0000-u001Fu007F]/g, ''); // Remove control characters
parsedResponse = JSON.parse(cleanedResponse);
}
if (parsedResponse && parsedResponse.response && Array.isArray(parsedResponse.response)) {
const filteredResponse = parsedResponse.response.filter(item => !item.Title.includes("IsBallotingInvoice:"));
this.responseData = { ...parsedResponse, response: filteredResponse };
}else {
console.error('Invalid response structure:', response);
this.responseData = response;
}
this.showSpinner = false;
this.isFlipped = true; // Flip the box when data is received
} catch (error) {
console.error('Error:', error);
this.showSpinner = false;
this.isFlipped = false;
}
},
error: (error) => {
console.error('Error:', error);
}
});
}
Ali cust is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.