Questionnaire based product filter / finder

I have products in my woocommerce store, i want to ask a set of few questions to the user, and the on the user input the respective products should show up in the page.

I have followed this guide, but stuck at,

  1. Each time a users submits the questionnaire, we’ll have to loop through the answers provided by a shopper and save them in an array. We have to use the gform_after_submission hook here.

  2. We have to then query WooCommerce products which include the attributes selected and list them.

How to Create a Questionnaire based WooCommerce Product Filter

The Below link is to products by attribute

WooCommerce list products by attribute with multiple values

Thank you.