When selecting the data from the MySQL database, If there is no data returned how can I change the response as a JSON message instead of “No text data found”
Hi @mcnaveen, you could check for a field that should have been returned in your IF node. E.g. a simple check could be whether the username field is empty using an expression of {{$json["username"]}} in your IF node.
If a user has been returned, the item would go to the false output (because the username field is not empty):
If there is no user, the empty item would go the true output:
You could then connect a Set node to the true output of your IF node to convert this empty JSON into a JSON with the fields you’d like to see.