title: getIntExtra in ViewModel android
body: <p>I have been trying to convert this small project to MVVM, where i switch the json file based on the previous activity, but i cannot use this intent.getIntExtra in ViewModel. how do i achieve that, the code given below is the one i wrote in the activity class, but i can't do
  intent.getIntExtra in viemodel. I am new to MVVM i want to use the ame function in viewModel class</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>private fun loadAllQuestions(){
          var jsonStr: String? = null
  
          if(intent.getIntExtra("FROM", 0) == 0){
               jsonStr = "mcq1.json".loadJSONFromAsset()
          }
          else if(intent.getIntExtra("FROM", 1) == 1){
               jsonStr = "mcq2.json".loadJSONFromAsset()
  
          }</code></pre>
  </div>
  </div>
  </p>