@sandesh Thanks for using FusionAuth!
I wanted to know if we can pass a custom data with membership field with JWT token.
You should be able to grab it out of user.memberships in the JWT populate lambda. I just tested this out:
console.log('membs: '+JSON.stringify(user.memberships));
and I see the data field.
If yes, can we configure a field from front end like we can do for a User registration page where the field is passed as user.data.fieldName.
This is not possible now. The only objects on which you can set custom data using the registration form are user and registration.
Since you can't add a membership at registration time, I'd suggest using a webhook on registration completion to populate the membership.data field.