Skip to content

Commit

Permalink
Merge pull request #214 from Ankit-Laddha/patch-1
Browse files Browse the repository at this point in the history
Update 05 data-parameterization.md
  • Loading branch information
mstoykov authored Feb 9, 2021
2 parents fe43243 + 6666a5f commit 43f7bc4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ import { SharedArray } from "k6/data";
// not using SharedArray here will mean that the code in the function call (that is what loads and
// parses the json) will be executed per each VU which also means that there will be a complete copy
// per each VU
const data = new SharedArray("some data name", function() { return JSON.parse(open('./data.json')); });
const data = new SharedArray("some data name", function() { return JSON.parse(open('./data.json')).users; });

export default function () {
let user = data.users[0];
console.log(data.users[0].username);
let user = data[0];
console.log(data[0].username);
}
```

Expand Down

0 comments on commit 43f7bc4

Please sign in to comment.