Of course. Make sure you disclose this fact in the Acknowledgments section of the article, and in your cover letter to the article.
Also, make sure that the article submitted to a JMIR journal is concise and follows the format requirements for the article type you are submitting. This may mean adapting your thesis length and headings.
See What are the article types for JMIR journals?
See Where are your instructions for authors? for details about how your submission must be formatted.