baskets

baskets()

baskets will return a qObj for the data in the [basketContents]() and [basketEvents]() sections of the survey data. The qObj will be augmented with question meta data such as questionTitle and others. Additionally, the basket data will be augmented with purchase timing data such as timeFromLastPurchase.

If the source qObj has no value question data then baskets will just return an empty TAFFY db.

Parameters

baskets takes no parameters

Returns

A qObj with the following fields:

Table 1. Top level result fields for baskets
Field Notes

startTime

question start time

endTime

question end time

duration

duration in HH:mm:ss.sss

questionID

questionTitle

type

question Type (LV2D etc.)

basketContent

Array, entry per item in basket, augmented copy of basketContents in the main data

basketEvents

copy of basketEvents in the main data

Table 2. Additional basketContent fields
Field Notes

UPC

Hoisted copy of userMeta.UPC for convenience

purchaseTime

Time product was first placed into the basket

timeFromLastPurchase

Duration HH:mm:ss.sss between last purchase and this item being placed in the basket

Example of using baskets
var basket = r
  .questions()
  .baskets()
  .get()
console.log(basket)

Head to the Sandbox to experiment with baskets.