refactoring (use getData function)

use getData function that returns array data for Json encode

Change-Id: I67e0e16805e0812d6507bf3ee6b9c9a0ed0f9772