@gengaipandi11 ,
To compare dates in JSON & to check if the birthdate occurs less or greater than xx days after today, you can use-
{% if moment(profile.person.birthDate).diff(moment(), 'days') <= 30 %}
{"content_id": "sample", "name": "{{profile.person.name.firstName}}"}
{% endif %}
In the above, moment(profile.person.birthDate) creates a moment object from the birthdate, and moment() creates a moment object for the current time. The diff method calculates the difference in days between the two moments. If the difference is less than or equal to 30, the JSON object is output with the person's first name.
Note that you may need to adjust the syntax and formatting depending on the specific JSON library or template engine you are using.