Ranging over JSON file strangely does not work

I got stuck with something I have done before successfully. I am really puzzled.

I am ranging over a laptops.json file that looks like this:

{
  "data": {
    "slides": {
      "slide1": {
        "laptopName": "Laptop HP 450 G6",
        "laptopPhoto": "laptop-hp-1.png",
        "laptopCharacteristics": [
          "Characteristic one",
          "Characteristic two"
        ],
        "url": "#"
      },
      "slide2": {
        "laptopName": "Laptop HP 830 G6",
        "laptopPhoto": "laptop-hp-2.png",
        "laptopCharacteristics": [
          "Characteristic one",
          "Characteristic two"
        ],
        "url": "#"
      }
    }
  }
}

In my premium-laptops.md file I have: datafile: "laptops"

In the partial file - the content itself - I have:

{{ $dataFile := .Site.Data.business .Params.datafile }}

<div class="row">
	<div class="col-12">
		<div class="swiper-container">
			<div class="swiper-wrapper">
				{{range $dataFile.data.slides}}
				<div class="swiper-slide">
					<div class="row">
						<div class="col-12 col-md-7 d-sm-flex slider-text">
							<div class="align-self-center py-5 py-sm-2">
								<h1 class="text-white main-text display-3">{{ .laptopName }}</h1>
								<div><a href="{{.url}}" class="btn btn-md btn-primary">Afla mai mult</a></div>
							</div>
						</div>

						<div class="col-12 col-sm-12 col-md-5 laptop-photo">
							<img src="{{ .Site.BaseURL}}/images/business/oferte-speciale/{{ .laptopPhoto }}" class="img-fluid">
						</div>
					</div>
				</div>
				{{end}}
			</div>
			<div class="swiper-pagination"></div> 
		</div>
	</div>
</div>

Note:

  1. All my jsons are in hugo\data\business directory.
  2. Using {{ $dataFile := index .Site.Data.business .Params.datafile }} gives the error: error calling index: index of untyped nil.

The browser shows nothing, as if the file was missing.

Why does that happen? What is the/a fix?

Does this work?

{{ $dataFile := index .Site.Data.business .Params.datafile }}

I already tried this. It gives the error:

error calling index: index of untyped nil

try something like this (first with a single file)

{{ $data := getJSON "/data/business/file1.json" }}
	{{ range  $data.data.slides }}
	{{end}}

and read